package cn.edu.ldk;

import cn.edu.ldk.common.CommonJsonResult;
import cn.edu.ldk.pojo.Address;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class ConsulController {
@GetMapping("/consul/getAddress")
    public CommonJsonResult<Address> getAddress(){
//假设从数据库获取到数据了
//    模拟数据
    Address address=new Address().setProvince("武汉").setCity("洪山").setArea("文化").setAddressId(10).setPostNum("66")
            .setTel("177");
    return new CommonJsonResult<>(200,"查询成功",address);
    }
}
